@import "@/assets/style/variables.scss";

$baseCls: common-modal;

.#{$baseCls} {
  position: fixed;
  top: 50%;
  left: 50%;
  background-color: white;
  width: 280px;
  border-radius: 12px;
  overflow: hidden;
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -45%);
  transition: all 0.2s ease-in-out;

  &.show {
    z-index: 200;
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
  }

  &-title {
    font-weight: 500;
    font-size: 17px;
    line-height: 24px;
    color: $text-color;
    text-align: center;
  }

  &-content {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 24px 20px;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: rgba($text-color, 0.75);
  }

  &-bottom {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    border-top: 0.5px solid rgba(22, 24, 35, 0.12);
  }

  &-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: $text-color;
    text-align: center;
    height: 100%;
    min-height: 48px;
  }

  &-btn.primary {
    font-weight: 500;
    border-left: 0.5px solid rgba(22, 24, 35, 0.12);
    min-height: 48px;
  }

  &-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 28px;
    height: 28px;
    background-color: rgba(22, 24, 35, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    &-icon {
      height: 22px;
      width: 22px;
    }
  }
}

.#{$baseCls}-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: rgba(#000000, 0.6);
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;

  &.show {
    z-index: 100;
    opacity: 1;
    visibility: visible;
  }
}
